package yunquan.wang.modules.base.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import yunquan.wang.base.domain.IdEntity;
@Entity
@Table(name = "base_codevalue")
public class CodeValue extends IdEntity{
	/**
	 * 
	 */
	private static final long serialVersionUID = 2239655854863225273L;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "codetype_id")
	private CodeType codeType;
	//代码
	@Column(name="code",length=50)
	private String code;
	//字符值
	@Column(name="stringvalue",length=50)
	private String stringValue;
	//中文名
	@Column(name="cnvalue",length=30)
	private String cnValue;
	//是否可用
	@Column(name="enable",length=1)
	private Boolean enable;
	//转换后的实际值
	@Transient
	private Object value;
	
	
	public Boolean getEnable() {
		return enable;
	}
	public void setEnable(Boolean enable) {
		this.enable = enable;
	}
	public CodeType getCodeType() {
		return codeType;
	}
	public void setCodeType(CodeType codeType) {
		this.codeType = codeType;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getStringValue() {
		return stringValue;
	}
	public void setStringValue(String stringValue) {
		this.stringValue = stringValue;
	}
	public String getCnValue() {
		return cnValue;
	}
	public void setCnValue(String cnValue) {
		this.cnValue = cnValue;
	}
	public Object getValue() {
		return value;
	}
	public void setValue(Object value) {
		this.value = value;
	}
	 

}
